
import 'package:cached_network_image/cached_network_image.dart';
import 'package:getx_scaffold/getx_scaffold.dart';

class ImageUtils {
  
  static ImageProvider getAssetImage(String path) {
    return AssetImage(path);
  }

  static ImageProvider getImageProvider(String? imageUrl, {String holderImg = 'none'}) {
    if (TextUtil.isEmpty(imageUrl)) {
      return AssetImage(holderImg);
    }
    return CachedNetworkImageProvider(imageUrl!);
  }
}
